﻿// <copyright file="FilterElement.cs" company="Todd Aspeotis">
//  Copyright © 2011 Todd Aspeotis
// </copyright>

namespace LocalReportsEngine.ReportDefinitionElements
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml.Linq;
    using System.Xml.Serialization;

    /// <summary>
    /// Provides a representation of the Filter element.
    /// </summary>
    public class FilterElement
    {
        /// <summary>
        /// Prevents a default instance of the FilterElement class from being created.
        /// </summary>
        private FilterElement()
        {
        }

        /// <summary>
        /// Gets the name of the report definition element this class represents.
        /// </summary>
        public static string ElementName
        {
            get { return "Filter"; }
        }

        /// <summary>
        /// Gets or sets the value of the FilterExpression child element.
        /// </summary>
        public string FilterExpression { get; set; }

        /// <summary>
        /// Gets or sets the collection of FilterValue elements.
        /// </summary>
        [XmlArray("FilterValues")]
        [XmlArrayItem("FilterValue")]
        public List<string> FilterValues { get; set; }

        /// <summary>
        /// Gets or sets the value of the Name attribute.
        /// </summary>
        [XmlAttribute("Name")]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the value of the Operator child element.
        /// </summary>
        public string Operator { get; set; }
    }
}
